package com.lz.homedecoration.common.request;
public class PageReq<T> {
    private T parameter;
    private long page;
    private long pageSize;
    private long startRow;

    public T getParameter() {
        return parameter;
    }

    public void setParameter(T parameter) {
        this.parameter = parameter;
    }

    public long getPage() {
        if(page<=0){
            this.setPage(1);
        }
        return page;
    }

    public void setPage(long page) {
        this.page = page;
    }

    public long getPageSize() {
        if(pageSize==0){
            this.setPageSize(10);
        }
        return pageSize;
    }

    public void setPageSize(long pageSize) {
        this.pageSize = pageSize;
    }

    public long getStartRow() {
        return (this.page-1)*pageSize;
    }

    public void setStartRow(long startRow) {
        this.startRow = startRow;
    }
}
